package com.mcxx.modules.temporary.order.dao.read;

import com.mcxx.modules.BaseParam;
import com.mcxx.modules.miniSalvation.check.dto.CheckFamilyDTO;
import com.mcxx.modules.miniSalvation.check.dto.IntegrateCheckDTO;
import com.mcxx.modules.miniSalvation.check.dto.ProResultDTO;
import com.mcxx.modules.miniSalvation.order.dto.NoticeDTO;
import com.mcxx.modules.miniSalvation.order.entity.OrderEntity;
import com.mcxx.modules.miniSalvation.order.param.OrderBizStateParam;
import com.mcxx.modules.system.dto.AuditConfirmListDTO;
import com.mcxx.modules.system.dto.PdfApproveDTO;
import com.mcxx.modules.system.dto.PdfApproveDetailDTO;
import com.mcxx.modules.temporary.cancel.entity.TmpCancelEntity;
import com.mcxx.modules.temporary.family.dto.SalvationResultDTO;
import com.mcxx.modules.temporary.family.dto.TempMemberExcelDto;
import com.mcxx.modules.temporary.family.dto.TmpFamilyExcelDTO;
import com.mcxx.modules.temporary.family.param.SalvationFamilyParam;
import com.mcxx.modules.temporary.family.param.SalvationObjectParam;
import com.mcxx.modules.temporary.order.dto.*;
import com.mcxx.modules.temporary.order.entity.TmpOrderDetailEntity;
import com.mcxx.modules.temporary.order.entity.TmpOrderEntity;
import com.mcxx.modules.temporary.order.param.OrderListSearchParam;
import com.mcxx.modules.temporary.order.param.TemporaryOrderParam;
import com.yinhai.ta404.module.mybatis.mapper.Ta404SupportMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TmpOrderReadDao extends Ta404SupportMapper {


	List<TmpOrderEntity> listAll();



	TmpOrderEntity getById(String id);


	int getByIdCount(String id);


	OrderEntity selectInfoByIdCard(String idcard);



	List<TmpOrderEntity> getByOrderIds(List<String> orderIdList);


	List<TmpOrderDTO> getTownSalvationTodoList(TemporaryOrderParam param);


	List<TmpOrderDTO> getTempApplyTodoList(TemporaryOrderParam param);


	List<TmpOrderDTO> queryNoFinishOrderCounty(TemporaryOrderParam param);


	List<TmpOrderDTO> getCanSendCheckOrder(List<String> orderIdList, String preBizState, String notEqBizState);


	TmpOrderDTO getStateAndVersion(String orderId);


	List<TmpOrderDTO> getStateAndVersions(List<String> orderIdList);


	String getBizStateByBizStateRange(String orderId, String preBizState);


    ApplicationDTO getDetailById(String orderId);


	ApplicationDTO getFinishedDetailById(String orderId);


	List<TmpOrderDTO> getOrderByIdAndBizStateCon(OrderBizStateParam orderBizStateParam);



	int countByFamilyIdAndReason(@Param("familyId") String familyId, @Param("reason") String reason, @Param("beginOfYear") String beginOfYear, @Param("endOfYear") String endOfYear);



	int countsByIdcardAndReason(@Param("idcard") String idcard, @Param("mainReason") String mainReason, @Param("beginOfYear") String beginOfYear, @Param("endOfYear") String endOfYear);



	int countByFamilyIdAndReason1(@Param("idcard") String idcard, @Param("reason") String reason, @Param("beginOfYear") String beginOfYear, @Param("endOfYear") String endOfYear);



	List<TmpOrderDTO> listFinishedOrderTown(OrderListSearchParam param);


	List<TmpOrderDTO> listFinishedOrderCounty(OrderListSearchParam param);


	Map<String, Double> getMasterSocietyNum(String idcard, String commitDate);


	TmpOrderDTO getOrderSarlayInfo(String orderId);


    List<SalvationResultDTO> listSalvationFamily(SalvationFamilyParam param);


	List<SalvationResultDTO> listSalvationObject(SalvationObjectParam param);



	List<TempMemberExcelDto> exportRescueMemberList(SalvationObjectParam param);


	List<TmpFamilyExcelDTO> exportRescueFamilyList(SalvationObjectParam param);


	List<TmpOrderDTO>  getOrderRecordFlag(@Param("idList") List<String> ids, @Param("recordFlag") String recordFlag);



    Map getFamilyCountSummary(SalvationFamilyParam param);



	Map getObjectCountSummary(SalvationObjectParam param);


	int countByFamilyIdAndMonth(@Param("familyId") String familyId,@Param("month") String month);


	int getSalvationLimit(@Param("countyCode") String countyCode,@Param("businessType") String businessType,@Param("standType") String standType);


    List<TmpOrderDTO> listTodoByFamilyId(String familyId);


	List<TmpOrderDTO> getOrderAndFamily(List<String> orderIdList);


	TmpOrderDetailEntity getAuditInfo(String orderId, String checkType);


	List<TmpOrderDetailEntity> getAuditInfos(String orderId, String checkType);



    int countBacklog(BaseParam param);


	String getBizStateById(String id);


	String getStateById(String id);


	TmpOrderSalaryDTO getFamilySalaryInfo(String orderId);


    TmpOrderEntity getFamilyIdAndBizStateById(String id);

	List<CheckFamilyDTO> getCheckInfo(List<String> list);

	List<ProResultDTO> getProResult(List<String> list);

	String  getMasertIdcard(String orderId);


	String  getgetApplyIdcard(String orderId);


	String queryStateByFmIdcard(@Param("idcard") String idcard, @Param("areacode") String areacode);

	TmpOrderStateVerifyDTO getBizStateReportFile(@Param("orderId")String orderId);

	String selectObjIdById(@Param("orderId")String orderId);

	List<String> cntFileObjId(List<String> list);


	NoticeDTO selectNoticeInfo(String orderId);

	String getOrderObjKey(String orderId);

	TmpOrderStatement selectOrderStatement(String orderId);

	List<TmpOrderExcelDTO> exportListTown(OrderListSearchParam param);


	List<TmpOrderExcelDTO> exportListCounty(OrderListSearchParam param);


	List<TmpOrderExcelPendingDTO> exportTownSalvation(TemporaryOrderParam param);


	List<TmpOrderExcelPendingCDTO> exportTownSalvationCounty(TemporaryOrderParam param);

	TmpCancelEntity selectCancelInfo(String orderId);


	List<PdfApproveDTO> findPdfInfo(String operateType, String orderId, String yearMon, String areaCode);


	List<PdfApproveDetailDTO> findPdfInfoDetail(List<String> list);

	List<IntegrateCheckDTO> getIntegrateCheckInfo(List<String> list);


    OrderEntity selectInfoByApplyIdCard(String idCard);


	List<OrderEntity> selectInfoByApplyIdCards(@Param("idcardList") List<String> idcardList);

	AuditConfirmListDTO selectAuditConfirmListDTO(String orderId);

	List<TmpOrderDTO> listTodoByApplyIdCard(String idCard);


	int getAuditNum(@Param("areaCode") String areaCode);


	List<TmpOrderDTO>  listTodoByMemberIdCard(String idcard);


	OrderEntity getApplyTodoInfo(@Param("idCard") String idCard, @Param("areaCode") String areaCode);

}
